Skip to content

Check for PWA updates in long-lived sessions - #306

Merged
mforce merged 1 commit into
mainfrom
fix/274-pwa-update-check
Jul 30, 2026
Merged

mforce merged 1 commit into
mainfrom
fix/274-pwa-update-check

Conversation

@mforce

@mforce mforce commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Closes #274

Summary

  • poll ServiceWorkerRegistration.update() hourly so a standalone PWA discovers new deploys without navigation
  • check again whenever the app returns to the visible state
  • tie the interval and visibility listener to the existing abort lifecycle and keep failed checks silent
  • preserve prompt-only activation so updates never reload underneath in-progress farm work
  • add Vitest coverage for repeated polling, visibility checks, cleanup, rejected promises, synchronous throws, and test isolation
  • refresh the graphify knowledge graph

The existing Help page and glossary already document background version discovery and prompt-before-reload behavior, so no user-facing terminology or copy change was needed.

Verification

  • npm run test:coverage — 1,190/1,190 passed; coverage gates passed
  • npm run build
  • npm run verify:sw
  • focused registerServiceWorker.test.ts — 22/22 passed
  • git diff --check

Independent review

  • Claude CLI: found three test gaps (repeated-period proof, synchronous-throw coverage, and cross-test lifecycle cleanup); all addressed before final verification
  • separate Codex standards/spec review: no findings
  • Pi v0.83.0 / DeepSeek V4 Flash DSpark final review: no findings

@mforce
mforce merged commit db87743 into main Jul 30, 2026
8 checks passed
@mforce
mforce deleted the fix/274-pwa-update-check branch July 30, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PWA never calls registration.update() — long-lived sessions run a stale shell

1 participant